<?php

use App\Models\Department;
use App\Models\User;
use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::truncate();

        $users = factory(User::class)->times(20)->make();

        $usersData = $users->makeVisible(['remember_token', 'password'])->toArray();

        User::insert($usersData);

        User::find(1)->update([
            'username' => 'admin',
        ]);
    }
}
